import React from 'react'
import {useLocation} from 'react-router-dom'
interface VideoData {
  id: number;
  title: string;
  pin: string;
  bo: string;
}
export default function Shid() {
  const location = useLocation();
  const videoData = location.state as VideoData | null;

  if (!videoData) {
    return <div>未获取到视频数据</div>;
  }

  return (
    <div>
      <h1>{videoData.title}</h1>
      <video src={videoData.pin} controls></video>
      <p>{videoData.bo}</p>
    </div>
  );
}
